﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace CoffeeSoft.App
{
    public partial class Form1 : Form
    {
        int wrongPassCount = 0;
        public Form1()
        {
            InitializeComponent();
        }
        
        private void button1_Click(object sender, EventArgs e)
        {
           
            

            if (textBox1.Text.Trim() != "aaa")
            {
                wrongPassCount ++;
            }

            if (wrongPassCount > 0)
            {
                MessageBox.Show("ban da nhap sai : " + wrongPassCount + " lan ban con" + (5 - wrongPassCount) + "lan");
               
            }
            if (wrongPassCount == 5)
            {
                textBox1.Visible = false;
             

            }
        }
    }
}
